#!/bin/env python
# coding=iso-8859-1

# Propósito: poe arquivos nao versionados sob o controle de versao
# Autor: Jaú
# Data: 26/09/2007

from subprocess import Popen, PIPE
import re
import os

def main():
  process = Popen(["svn", "status"], stdout=PIPE)
  result = process.stdout.read()

  for line in result.splitlines():
    m = re.match(r"\?\s+(.+)", line)
    if m:
     file = m.group(1)
     os.system("svn add %s" % file)

if __name__ == "__main__":
  main()

